@echo off
if H%1 == H set /p c=arguments:

osql %c% %* -d "MiniStock.Entities" -Q "delete from OrderItems;"
osql %c% %* -d "MiniStock.Entities" -Q "delete from Orders;"
osql %c% %* -d "MiniStock.Entities" -Q "delete from Products;"
osql %c% %* -d "MiniStock.Entities" -Q "delete from Customers;"
osql %c% %* -d "MiniStock.MessageMap" -Q "delete from MessageMapRepositoryEntries;"
osql %c% %* -d "MiniStock.Events" -Q "delete from Events;"

cscript /nologo msmq.vbs /action:purge /queue:eventdispatcher.in
cscript /nologo msmq.vbs /action:purge /queue:eventpersister.1.in
cscript /nologo msmq.vbs /action:purge /queue:eventprocessor.1.in
cscript /nologo msmq.vbs /action:purge /queue:Persister.1.0.in
cscript /nologo msmq.vbs /action:purge /queue:processor.1.0.in
